The present invention relates to a program debugging support device and more particularly to a device which supports debugging a program in the course of a communication through a network between terminals.
Recently, computer networks such as a LAN (Local Area Network), WAN (Wide Area Network) and internet have developed, so that communications have actively been performed between computers.
Thus, various communication paths have been developed and used. For example, in a LAN, an Ethernet is used frequently as a physical layer/data link layer while a TCP/IP (Transmission Control Protocol/Internet Protocol) layer is used generally as a network layer/transport layer. As shown in FIG. 4, the physical layer, the data link layer, the network layer and the transport layer correspond to lower four layers of an OSI (Open Systems Interconnection) seven-layered model. FIG. 4 shows a relationship in correspondence between the respective layers of the OSI basic reference model and the respective layers of an architecture model using the TCP/IP and Ethernet.
General client-server communication in a network using an Ethernet and TCP/IP will be outlined with reference to FIG. 5, which is a block diagram of a computer network which carries out conventional client-server communication. The computer network of FIG. 5 is provided with a first computer 1 as a client machine, a second computer 2 as a server machine, and an Ethernet 3 which is connected to the computers 1 and 2. The first computer 1 is provided with a network interface hardware 11 which acts as an interface between the computer 1 and the Ethernet 3, a TCP/IP network driver program 12 and a client program 13. The second computer 2 is provided with a network interface hardware 21 which acts as an interface between the computer 2 and the Ethernet 3, a TCP/IP network driver program 22, and a server program 23.
The client program 13 which operates on the first computer 1 requests a port for communication from the TCP/IP network driver program 12 in the computer 1 to obtain a port 14 with a port number X. The port number X is one of port numbers which are unused in the first computer 1.
The client program 13 delivers to the TCP/IP network driver program 12 a port number Y of a port 24 which the IP address server program 23 of the second computer 2 uses, and data to be communicated to the server program 23.
The TCP/IP network driver 12 of the first computer 1 adds an IP address of the first computer 1 itself, the port number X of the client program 13 and a checksum to detect a transmission error to an IP address of the second computer 2, the port number Y of the server program 23 and data to be transmitted to the server program 23, received from the client program 13 to produce a datagram (IP datagram) to a data form stipulated by an IP (Internet Protocol), and sends it through the network interface hardware 11 to the Ethernet 3.
The second computer 2 gets from the Ethernet 3 the datagram for the second computer 2 through network interface hardware 21. The TCP/IP network driver program 22 deletes from the gotten data program the data which includes the IP address of the first computer 1, the port number X of the client program 13 and the checksum, added by the TCP/IP network driver program 12 of the first computer 1 as the sending source, and delivers only required data to the port number Y of the server program 23.
The port number Y of the server program 23 is inherent in the server program 23, which monitors arrival of data from the first computer 1 at the port with the port number Y thereof, and gets the arriving data.
The IP address of the first computer 1 and the port number X of the client program 13 are held within the TCP/IP network driver 22 of the second computer, become destination addresses for which data is sent back, and are referred to in accordance with a request from the server program 23.
The client program 13 has a port number X which changes each time the client program 13 is started up. The server program 23 always has the same port number Y. Communication between the client and the server is performed without fail by specifying those two port numbers of the client program 13 and server program 23 and the IP addresses of the first and second computers.
While in the above the computers as the terminals and the Ethernet TCP/IP as communication means have been taken as an example, devices which carries out client-server communication carries out substantially similar operations.
In the development of client programs and server programs used in such network communication, communication tests and their verification are required in a state where the devices concerned are actually connected to the network and programs actually operate, in addition to a regular developing process of the programs. That is, it is tested and verified whether data was sent and received satisfactorily, or whether the sent/received data was correct or not, etc. If there are some problems, the program used is required to be debugged.
Conventionally, in order to debug a program, a software debugger or a hardware debugger (ICE In-Circuit Emulator) is used. Those debuggers can detect internal operations of the computer, but cannot detect actual data flowing through the Ethernet 3. Thus, for example, a protocol analyzer is used to get data which flows through the network and to refer to it to debug same.
When the protocol analyzer gets data which flows the network, various data flow though the network. Thus, target data is required to be selected.
Recently, multi-task processing has become popular also in a personal computer where more and more increasing tasks are communicated with the same IP address. Thus, even when the received data are selected with an IP address, excess data other than the target data could be gotten in addition to the required data. As a result, useless data could be left.
In this case, in order to get data contained in a program to be debugged, the IP addresses of the first and the second computers 1 and 2, the port number X of the client program 13, and the port number Y of the server program 23 are required.
The IP addresses of the first and second computers 1 and 2 and the port number Y of the server program 23 are fixed whereas the port number X of the client program 13 is dynamically determined each time its program is executed. Therefore, the port number X can not be known beforehand and hence it is difficult to automatically select and get required data alone.
If a special-purpose computer or network can be prepared for debugging purposes, the above problem is unlikely to occur and debugging becomes facilitated. However, to this end, the cost would increase. In addition, problems which can occur when loads are added on the computers and/or network are difficult to occur in the special-purpose debugging environment. Thus, it is desired to debug a program in an environment where the program is used actually.
It is therefore an object of the present invention to provide a program debugging support device which easily and securely extracts and collects only a communication datagram based on a program under debugging from among unsorted massive communication datagrams which flow through a network to thereby support debugging the program.